<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文字对齐</title>
    <style>
        .center{
            text-align: center;
        }
        .left{
            text-align: left;
        }

        .right{
            text-align: right;
        }
    </style>
</head>
<body>
<div class="center">文本对齐-居中</div>
<div class="right">文本对齐-右侧</div>
<div class="left">文本对齐-左侧</div>
</body>
</html>